
var defaultValue = Cesium.defaultValue;
var defined = Cesium.defined;
var defineProperties = Object.defineProperties;
var DeveloperError = Cesium.DeveloperError;
var Event = Cesium.Event;
var createMaterialPropertyDescriptor = Cesium.createMaterialPropertyDescriptor;
var createPropertyDescriptor = Cesium.createPropertyDescriptor;

function HighPowerGraphics(options) {
    this._show = undefined;
    this._color = undefined;

    this._lineColor = undefined;
    this._height = undefined;
    this._radius = undefined;
    this._heightInterval = undefined;
    this._radiusInterval = undefined;

    this._showLine = undefined;
    this._showScanPlane = undefined;
    this._ScanPlaneColor = undefined;
    this._ScanPlaneSwitch = undefined;
    this._ScanPlaneSpeed = undefined;


    this._definitionChanged = new Event();
    this.merge(defaultValue(options, defaultValue.EMPTY_OBJECT));
}

Object.defineProperties(HighPowerGraphics.prototype, {
    definitionChanged: {
        get: function () {
            return this._definitionChanged;
        }
    },
    show: createPropertyDescriptor('show'),
    color: createPropertyDescriptor('color'),
    lineColor: createPropertyDescriptor('lineColor'),
    height: createPropertyDescriptor('height'),
    radius: createPropertyDescriptor('radius'),
    heightInterval: createPropertyDescriptor('heightInterval'),
    radiusInterval: createPropertyDescriptor('radiusInterval'),

    showLine: createPropertyDescriptor('showLine'),
    showScanPlane: createPropertyDescriptor('showScanPlane'),
    ScanPlaneColor: createPropertyDescriptor('ScanPlaneColor'),
    ScanPlaneSwitch: createPropertyDescriptor('ScanPlaneSwitch'),
    ScanPlaneSpeed: createPropertyDescriptor('ScanPlaneSpeed'),

    // gaze: createPropertyDescriptor('gaze'),
});

HighPowerGraphics.prototype.clone = function (result) {
    if (!defined(result)) {
        result = new HighPowerGraphics();
    }
    result.show = this.show;
    result.color = this.color;
    // result.gaze = this.gaze;
    result.lineColor = this.lineColor;
    result.height = this.height;
    result.radius = this.radius;
    result.heightInterval = this.heightInterval;
    result.radiusInterval = this.radiusInterval;


    result.showLine = this.showLine;
    result.showScanPlane = this.showScanPlane;
    result.ScanPlaneColor = this.ScanPlaneColor;
    result.ScanPlaneSwitch = this.ScanPlaneSwitch;
    result.ScanPlaneSpeed = this.ScanPlaneSpeed;

    return result;
};

HighPowerGraphics.prototype.merge = function (source) {
    if (!defined(source)) {
        throw new DeveloperError('source is required.');
    }
    this.show = defaultValue(this.show, source.show);
    this.color = defaultValue(this.color, source.color);
    this.lineColor = defaultValue(this.lineColor, source.lineColor);
    this.height = defaultValue(this.height, source.height);
    this.radius = defaultValue(this.radius, source.radius);
    this.heightInterval = defaultValue(this.heightInterval, source.heightInterval);
    this.radiusInterval = defaultValue(this.radiusInterval, source.radiusInterval);

    this.showLine = defaultValue(this.showLine, source.showLine);
    this.showScanPlane = defaultValue(this.showScanPlane, source.showScanPlane);
    this.ScanPlaneColor = defaultValue(this.ScanPlaneColor, source.ScanPlaneColor);
    this.ScanPlaneSwitch = defaultValue(this.ScanPlaneSwitch, source.ScanPlaneSwitch);
    this.ScanPlaneSpeed = defaultValue(this.ScanPlaneSpeed, source.ScanPlaneSpeed);

};


export { HighPowerGraphics };